package com.dong.applicationcontext.i18n;

import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Locale;

/**
 * description
 *
 * @author Administrator 2021/09/06 19:05
 */
public class ApplicationContextTest {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/message/bean.xml");

        String message = context.getMessage("argument.required",
                new Object [] {"userDao"}, "Required", Locale.UK);

        System.out.println(message);
    }
}
